//服务器
const http = require('node:http')
const url = require('node:url')

//接受前端发送的信息
//发送消息给前端
const server = http.createServer((req,res)=>{
    //req 请求
    //res 响应
    //console.log(req.method)
    var {pathname,query} = url.parse(req.url)
    res.writeHead(200,{'Content-Type':"text/plain;charset=utf-8"})
    res.write('这是服务器返回的内容')
    res.end()
})
server.listen(3000)